package com.example.demo1.exception;

import org.springframework.http.HttpStatus;


import java.time.ZonedDateTime;

public class ApiException {
        private final String message;
        private final Throwable throwable;

        @Override
        public String toString() {
            return "ApiException{" +
                    "message='" + message + '\'' +
                    ", throwable=" + throwable +
                    ", httpStatus=" + httpStatus +
                    ", zonedDateTime=" + zonedDateTime +
                    '}';
        }

        private final HttpStatus httpStatus;

        public String getMessage() {
            return message;
        }

        public Throwable getThrowable() {
            return throwable;
        }

        public HttpStatus getHttpStatus() {
            return httpStatus;
        }

        public ZonedDateTime getZonedDateTime() {
            return zonedDateTime;
        }

        private final ZonedDateTime zonedDateTime;

        public ApiException(String message, Throwable throwable, HttpStatus httpStatus, ZonedDateTime zonedDateTime) {
            this.message = message;
            this.throwable = throwable;
            this.httpStatus = httpStatus;
            this.zonedDateTime = zonedDateTime;
        }

}
